<template>
  <div>
    <el-link type="pramiry" @click="backHandler">返回</el-link>

    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="基本信息" name="first">
        <div>
          <!-- ID:{{ $route.params.id }} -->
          <br />
          姓名:{{ customers_d.realname }}
        </div>
      </el-tab-pane>
      <el-tab-pane label="订单信息" name="second">订单信息</el-tab-pane>
      <el-tab-pane label="服务地址" name="third">服务地址</el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import { mapActions, mapState } from "vuex";
export default {
  data() {
    return {
      activeName: "first",
    }; 
  },
  created() {
    this.findCustomerById(this.$route.params.id);
  },
  computed: {
    ...mapState("customer", ["customers_d"]),
  },
  methods: {
    ...mapActions("customer", ["findCustomerById"]),
    backHandler() {
      // 编程式导航
        this.$router.go(-1);
    },
    handleClick(){
      console.log("tab发生了切换")
    }
  },
};
</script>

<style>
</style>